Each element is a single value, a color index. The GL converts
it to fixed point (with an unspecified number of zero bits to
the right of the binary point), shifted left or right depending
on the value and sign of GGGGLLLL____IIIINNNNDDDDEEEEXXXX____SSSSHHHHIIIIFFFFTTTT, and added to
GGGGLLLL____IIIINNNNDDDDEEEEXXXX____OOOOFFFFFFFFSSSSEEEETTTT (see ggggllllPPPPiiiixxxxeeeellllTTTTrrrraaaannnnssssffffeeeerrrr). The resulting index is
Each element is a luminance/alpha pair. The GL converts it to
floating point, then assembles it into an RGBA element by
replicating the luminance value three times for red, green, and
blue. Each component is then multiplied by the signed scale
factor GGGGLLLL____cccc____SSSSCCCCAAAALLLLEEEE, added to the signed bias GGGGLLLL____cccc____BBBBIIIIAAAASSSS, and
clamped to the range [0,1] (see ggggllllPPPPiiiixxxxeeeellllTTTTrrrraaaannnnssssffffeeeerrrr).
Refer to the ggggllllDDDDrrrraaaawwwwPPPPiiiixxxxeeeellllssss reference page for a description of the
acceptable values for the _t_y_p_e parameter.
If an application wants to store the texture at a certain resolution or
in a certain format, it can request the resolution and format with
_i_n_t_e_r_n_a_l_f_o_r_m_a_t. The GL will choose an internal representation that
closely approximates that requested by _i_n_t_e_r_n_a_l_f_o_r_m_a_t, but it may not
match exactly. (The representations specified by GGGGLLLL____LLLLUUUUMMMMIIIINNNNAAAANNNNCCCCEEEE,
GGGGLLLL____LLLLUUUUMMMMIIIINNNNAAAANNNNCCCCEEEE____AAAALLLLPPPPHHHHAAAA, GGGGLLLL____RRRRGGGGBBBB, and GGGGLLLL____RRRRGGGGBBBBAAAA must match exactly. The numeric
values 1, 2, 3, and 4 may also be used to specify the above
representations.)
Use the GGGGLLLL____PPPPRRRROOOOXXXXYYYY____TTTTEEEEXXXXTTTTUUUURRRREEEE____3333DDDD target to try out a resolution and format.
The implementation will update and recompute its best match for the
requested storage resolution and format. To then query this state, call
ggggllllGGGGeeeettttTTTTeeeexxxxLLLLeeeevvvveeeellllPPPPaaaarrrraaaammmmeeeetttteeeerrrr. If the texture cannot be accommodated, texture
state is set to 0.
A one-component texture image uses only the red component of the RGBA
color extracted from _p_i_x_e_l_s. A two-component image uses the R and A
values. A three-component image uses the R, G, and B values. A four-
Normally ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDD is synchronous: OpenGL executes a ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDD
command in the order it is issued in the OpenGL command stream. Calling
ggggllllEEEEnnnnaaaabbbblllleeee with parameter GGGGLLLL____AAAASSSSYYYYNNNNCCCC____TTTTEEEEXXXX____IIIIMMMMAAAAGGGGEEEE____SSSSGGGGIIIIXXXX causes subsequent
ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDD commands to be asynchronous as defined by the SSSSGGGGIIIIXXXX____aaaassssyyyynnnncccc
extension. An asynchronous ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDD command samples the OpenGL state
vector at the point in the OpenGL command stream where the command is
issued, but the results of the command (e.g. availability of texels for
use in rasterization) do not happen until some unspecified time in the
future. In particular, the order of the asynchronous command relative to
other OpenGL commands issued later in the command stream is undefined.
An implementation may choose to execute asynchronous commands in parallel
with the normal command stream or at some convenient time in the future.
Calling ggggllllDDDDiiiissssaaaabbbblllleeee with parameter GGGGLLLL____AAAASSSSYYYYNNNNCCCC____TTTTEEEEXXXX____IIIIMMMMAAAAGGGGEEEE____SSSSGGGGIIIIXXXX restores the
default synchronous behavior for subsequent ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDD commands. It
does not affect any pending asynchronous ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee commands, or wait for
their completion.
When an asynchronous ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDD command is issued, it is associated
with the current value of GGGGLLLL____AAAASSSSYYYYNNNNCCCC____MMMMAAAARRRRKKKKEEEERRRR____SSSSGGGGIIIIXXXX as defined by the
SSSSGGGGIIIIXXXX____aaaassssyyyynnnncccc extension. A program can determine if an asynchronous
ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDD command has completed by using the ggggllllFFFFiiiinnnniiiisssshhhhAAAAssssyyyynnnnccccSSSSGGGGIIIIXXXX or
The texture image can be represented by the same data formats as the
pixels in a ggggllllDDDDrrrraaaawwwwPPPPiiiixxxxeeeellllssss command, except that GGGGLLLL____SSSSTTTTEEEENNNNCCCCIIIILLLL____IIIINNNNDDDDEEEEXXXX and
GGGGLLLL____DDDDEEEEPPPPTTTTHHHH____CCCCOOOOMMMMPPPPOOOONNNNEEEENNNNTTTT cannot be used. ggggllllPPPPiiiixxxxeeeellllSSSSttttoooorrrreeee and ggggllllPPPPiiiixxxxeeeellllTTTTrrrraaaannnnssssffffeeeerrrr
modes affect texture images in exactly the way they affect ggggllllDDDDrrrraaaawwwwPPPPiiiixxxxeeeellllssss.
GGGGLLLL____AAAABBBBGGGGRRRR____EEEEXXXXTTTT is part of the EEEEXXXXTTTT____aaaabbbbggggrrrr extension, not part of the core GL
command set. If GGGGLLLL____EEEEXXXXTTTT____aaaabbbbggggrrrr is included in the string returned by
ggggllllGGGGeeeettttSSSSttttrrrriiiinnnngggg, when called with argument GGGGLLLL____EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS, extension EEEEXXXXTTTT____aaaabbbbggggrrrr
is supported by the GL.
ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDD is available only if the GL version is 1.2 or greater.
Internal formats other than 1, 2, 3, or 4 may be used only if the GL
version is 1.1 or greater.
_p_i_x_e_l_s may be a null pointer. In this case texture memory is allocated to
accommodate a texture of width _w_i_d_t_h, height _h_e_i_g_h_t, and depth _d_e_p_t_h.
You can then download subtextures to initialize this texture memory. The
image is undefined if the user tries to apply an uninitialized portion of
Formats GGGGLLLL____BBBBGGGGRRRR, and GGGGLLLL____BBBBGGGGRRRRAAAA and types GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____BBBBYYYYTTTTEEEE____3333____3333____2222,
GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____8888____8888____8888____8888____RRRREEEEVVVV, GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____11110000____11110000____11110000____2222, and
GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____2222____11110000____11110000____11110000____RRRREEEEVVVV are available only if the GL version is
1.2 or greater.
If the GGGGLLLL____AAAARRRRBBBB____iiiimmmmaaaaggggiiiinnnngggg extension is supported, RGBA elements may also be
processed by the imaging pipeline. The following stages may be applied
to an RGBA color before color component clamping to the range [0, 1]:
1. Color component replacement by the color table specified for
GGGGLLLL____CCCCOOOOLLLLOOOORRRR____TTTTAAAABBBBLLLLEEEE, if enabled. See ggggllllCCCCoooolllloooorrrrTTTTaaaabbbblllleeee.
2. Color component replacement by the color table specified for
GGGGLLLL____PPPPOOOOSSSSTTTT____CCCCOOOONNNNVVVVOOOOLLLLUUUUTTTTIIIIOOOONNNN____CCCCOOOOLLLLOOOORRRR____TTTTAAAABBBBLLLLEEEE, if enabled. See ggggllllCCCCoooolllloooorrrrTTTTaaaabbbblllleeee.
3. Transformation by the color matrix. See ggggllllMMMMaaaattttrrrriiiixxxxMMMMooooddddeeee.
4. RGBA components may be multiplied by GGGGLLLL____PPPPOOOOSSSSTTTT____CCCCOOOOLLLLOOOORRRR____MMMMAAAATTTTRRRRIIIIXXXX____cccc____SSSSCCCCAAAALLLLEEEE,
and added to GGGGLLLL____PPPPOOOOSSSSTTTT____CCCCOOOOLLLLOOOORRRR____MMMMAAAATTTTRRRRIIIIXXXX____cccc____BBBBIIIIAAAASSSS, if enabled. See
5. Color component replacement by the color table specified for
GGGGLLLL____PPPPOOOOSSSSTTTT____CCCCOOOOLLLLOOOORRRR____MMMMAAAATTTTRRRRIIIIXXXX____CCCCOOOOLLLLOOOORRRR____TTTTAAAABBBBLLLLEEEE, if enabled. See ggggllllCCCCoooolllloooorrrrTTTTaaaabbbblllleeee.
EEEERRRRRRRROOOORRRRSSSS
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_a_r_g_e_t is not GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____3333DDDD or
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _b_o_r_d_e_r is not 0 or 1.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDD is executed between the
execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ggggllllEEEEnnnndddd.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if _t_y_p_e is one of
GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____SSSSHHHHOOOORRRRTTTT____5555____6666____5555, or GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____SSSSHHHHOOOORRRRTTTT____5555____6666____5555____RRRREEEEVVVV and _f_o_r_m_a_t is not
GGGGLLLL____RRRRGGGGBBBB.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if _t_y_p_e is one of
GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____11110000____11110000____11110000____2222, or GGGGLLLL____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD____IIIINNNNTTTT____2222____11110000____11110000____11110000____RRRREEEEVVVV and _f_o_r_m_a_t
is not GGGGLLLL____RRRRGGGGBBBBAAAA, GGGGLLLL____BBBBGGGGRRRRAAAA or GGGGLLLL____AAAABBBBGGGGRRRR____EEEEXXXXTTTT.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if GGGGLLLL____AAAASSSSYYYYNNNNCCCC____TTTTEEEEXXXX____IIIIMMMMAAAAGGGGEEEE____SSSSGGGGIIIIXXXX is enabled
and the number of asynchronous ggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee commands that have been issued
but not queried (using ggggllllFFFFiiiinnnniiiisssshhhhAAAAssssyyyynnnnccccSSSSGGGGIIIIXXXX or ggggllllPPPPoooollllllllAAAAssssyyyynnnnccccSSSSGGGGIIIIXXXX) exceeds
On RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222, and VVVVTTTTXXXX systems, the following
restrictions apply to 3D texturing:
1. The texture environment must be defined and texturing must be
enabled before loading a texture.
2. Texture formats composed only of alpha are not supported.
3. Borders are not supported; hence the border width must be 0.
4. Proxy textures are not supported.
5. 3D mipmaps are not supported. Hence, the minifying function must
be set to GGGGLLLL____NNNNEEEEAAAARRRREEEESSSSTTTT or GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR (see ggggllllTTTTeeeexxxxPPPPaaaarrrraaaammmmeeeetttteeeerrrr).
6 3D texturing when rendering to pixmaps is not supported.
7. GGGGLLLL____IIIINNNNTTTTEEEERRRRLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX is not supported (see ggggllllEEEEnnnnaaaabbbblllleeee).
On HHHHiiiigggghhhh IIIImmmmppppaaaacccctttt and MMMMaaaaxxxxiiiimmmmuuuummmm IIIImmmmppppaaaacccctttt systems, the following restrictions
apply to 3D texturing:
1. Perspective views are not supported.
2. Borders are not supported; hence the border width must be 0.
3. 3D mipmaps are not supported. Hence, the minifying function must
be set to GGGGLLLL____NNNNEEEEAAAARRRREEEESSSSTTTT or GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR (see ggggllllTTTTeeeexxxxPPPPaaaarrrraaaammmmeeeetttteeeerrrr), and the
level parameter must be 0.
4. Textures that have a width of 16 or less will not render
correctly at the wrap_s boundary.
On OOOOccccttttaaaannnneeee2222 VVVVPPPPrrrroooo systems, 3D mipmapping is not supported. However, all
OpenGL state related to the GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____3333DDDD target is correctly error-
checked and queryable. For example, an incomplete mipmap stack results
in disabling 3D texturing, just as if 3D mipmapping were supported. The
only restriction is that, during rasterization, only the base level of
the texture is sampled. (The GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____BBBBAAAASSSSEEEE____LLLLEEEEVVVVEEEELLLL parameter may be used
to establish the base level of the texture; it need not be level 0.) For
3D texturing at rasterization time, the mipmapping forms of the
GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____MMMMIIIINNNN____FFFFIIIILLLLTTTTEEEERRRR parameter are synonymous with the equivalent non-